﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}
<script src="~/js/jquery.min.js"></script>

<h1>Test log</h1>


<form method="post">
    <input type="text" name="myname" />
    <input type="submit" value="提交" />
</form>


<button id="btnSave">测试Ajax提交</button>


<script>
    $(function () {
        $("#btnSave").click(function () {
            $.ajax({
                url: "/LogTest/TestAjax",
                type: "Post",
                data: { name: '张三', age: 18 },
                dataType: "json",
                success: function (data) {
                    console.log('111');
                    alert(data.message);
                }
            });

            return false;
        });

    });
</script>